<?php
class BpcCurrent extends BpcHtml{

function Fill(){
	$h2 = new BphItemBox('h2');
	$h2->AddItems(LNG_CLIENT);
	$this->AddItems($h2);

	$source='clients';

	if ( isset($_GET['key']) )
		$key = $_GET['key'];
	else
		$key = -2;
	if ( $key==-1 ){
		if ($level<$level_new) 
			return ERR_GR_NEW;
		else{
			$edition = TRUE;
			$new = TRUE;
		}
	}
	elseif ( $level<$level_read ){
		return ERR_GR_READ;
	}
	/*
	elseif ( $table->Exists($key) ){
		if ( isset($_GET['edition']) )
			$edition = ($_GET['edition']=='1')? TRUE: FALSE;
		else
			$edition = FALSE;
	}
	*/

	$nav = new BphTdi();

	//Onglet Général

	$div = $nav->AddTab(LNG_GENERAL, LNG_ONGLET);
	$div->AddItems('1');

	//Onglet contact

	$div = $nav->AddTab(LNG_CONTACTS, LNG_ONGLET);
	$navi = navisql($source, 'contacts', $key);
	$div->AddItems($navi);

	//Onglet machines

	$div = $nav->AddTab(LNG_MACHINES, LNG_ONGLET);
	$navi = navisql($source, 'machines', $key);
	$div->AddItems($navi);

	$this->AddItems($nav);
}

}


?>
